#include<iostream>
#include<string>
#include<vector>

using namespace std;
int main() {
	int n;
	cin >> n;
	int result = 0;
	while (n--) {
		int num;
		cin >> num;
		string str = to_string(num);
		for (char c : str) {
			if (c > '0') result++;
		}
	}
	cout << result;

	return 0;
}